package com.mrzhou.mybatis.injector;

import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
import com.mrzhou.mybatis.injector.method.InsertIgnore;
import com.mrzhou.mybatis.injector.method.Replace;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class CloudSqlInjector extends DefaultSqlInjector {

    @Override
    public List<AbstractMethod> getMethodList(Class<?> mapperClass) {
        List<AbstractMethod> methodList = new ArrayList();
        methodList.add(new InsertIgnore());
        methodList.add(new Replace());
        methodList.addAll(super.getMethodList(mapperClass));
        return Collections.unmodifiableList(methodList);
    }

}
